package com.hangzhou.welbeing.welbeinginstrument.activity;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ImageView;

import com.hangzhou.welbeing.welbeinginstrument.R;
import com.hangzhou.welbeing.welbeinginstrument.adapter.AllCircleFragmentPagerAdapter;
import com.hangzhou.welbeing.welbeinginstrument.utils.Utils;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 时间 2017 年 09 月 08.
 * 作者 Administrator  刘传华
 * 公司 杭州惟君医疗科技有限公司
 * 包名 com.hangzhou.welbeing.pregnant.welbeing_pregnant.adapter
 * 工程名 welbeing_pregnant
 * @desc 全部圈子
 */
public class AllCircleActivity extends FragmentActivity {
    @Bind(R.id.activity_all_circle_iv_return)
    ImageView activityAllCircleIvReturn;
    @Bind(R.id.activity_all_circle_tablayout)
    TabLayout activityAllCircleTablayout;
    @Bind(R.id.activity_all_circle_viewpager)
    ViewPager activityAllCircleViewpager;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_all_circle);
        ButterKnife.bind(this);

        Utils.setStatusBar(this,false,false);
        Utils.setStatusTextColor(true,this);

        AllCircleFragmentPagerAdapter allCircleFragmentPagerAdapter = new AllCircleFragmentPagerAdapter(getSupportFragmentManager());
        activityAllCircleViewpager.setAdapter(allCircleFragmentPagerAdapter);

        activityAllCircleTablayout.setupWithViewPager(activityAllCircleViewpager);
        //activityAllCircleTablayout.setTabMode(TabLayout.MODE_FIXED);
        //设置可以滑动
        activityAllCircleTablayout.setTabMode(TabLayout.MODE_SCROLLABLE);
        activityAllCircleIvReturn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
                overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
            }
        });

    }
}
